<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
    <div class="clearfix">
        <aside class="pull-right mt5">
            <span class="c-warning fs12">
                <i class="fa fa-warning"></i>
                 商品在支付成功后，会立即开通。偶有数据延时，请支付成功后耐心等待！
            </span>
        </aside>
        <aside class="pull-left">
            <span class="fs24 c-warning"><i class="fa fa-gift"></i></span>
            <span class="ml10 fs20 c-333">商品信息</span>
            <span class="ml10 fs12 c-999">
                共<small class="c-warning fs14 shop-num" th:text="${resultMap['buyNum']}"></small>件商品
            </span>
        </aside>
    </div>
    <div class="mt20 pt10 pb10 mb20 ml20 mr20">
        <section class="row">
            <article class="col-sm-4">
                <div>
                    <span class="fs16 c-333">商品名称</span>
                </div>
            </article>
            <aside class="col-sm-3">
                <div class="text-center">
                    <span class="fs16 c-333">价格</span>
                </div>
            </aside>
            <aside class="col-sm-2">
                <div class="text-center">
                    <span class="fs16 c-333">优惠</span>
                </div>
            </aside>
            <aside class="col-sm-2">
                <div class="text-center">
                    <span class="fs16 c-333">小计</span>
                </div>
            </aside>
            <aside th:if="${#strings.isEmpty(shopData)}" class="col-sm-1">
                <div class="text-center">
                    <span class="fs16 c-333">操作</span>
                </div>
            </aside>
        </section>
        <div class="order-course-list" id="shop-list-box">
            <section th:each="shopVo : ${shopList}" class="row order-course-item" th:attrappend="id='shop-list-section-'+${shopVo['shopType']}+'-'+${shopVo['shopId']}">
                <input type="hidden" name="shopCartId" th:value="${shopVo['shopCartId']}"/>
                <input type="hidden" name="shopType" th:value="${shopVo['shopType']}"/>
                <input type="hidden" name="shopId" th:value="${shopVo['shopId']}"/>
                <input type="hidden" th:if="${shopVo['shopType']} !='BOOK'" name="buyNum" th:value="${shopVo['buyNum']}"/>
                <article class="col-sm-4">
                    <div class="clearfix mr10">
                        <div th:if="${shopVo['shopType']}=='COURSE'" class="media">
                            <div class="media-left">
                                <a th:href="@{/web/course/courseInfo?courseId={courseId}(courseId=${shopVo['shopId']})}" target="_blank">
                                    <img class="media-object" width="80" th:src="${shopVo['course']['imageMap']['pcUrlMap']['medium']}" data-holder-rendered="true"/>
                                </a>
                            </div>
                            <div class="media-body">
                                <section class="cm-desc-txt__twoLine">
                                    <a th:href="@{/web/course/courseInfo?courseId={courseId}(courseId=${shopVo['shopId']})}" target="_blank" class="fs14 c-999" th:text="${shopVo['shopName']}"></a>
                                </section>
                            </div>
                        </div>
                        <div th:if="${shopVo['shopType']}=='BOOK'" class="media">
                            <div class="media-left">
                                <a th:href="@{/web/book/info?bookId={bookId}(book=${shopVo['shopId']})}" target="_blank">
                                    <img class="media-object" width="80" th:src="${shopVo['book']['imageMap']['pcUrlMap']['small']}" data-holder-rendered="true"/>
                                </a>
                            </div>
                            <div class="media-body">
                                <section class="cm-desc-txt__twoLine">
                                    <a th:href="@{/web/book/info?bookId={bookId}(book=${shopVo['shopId']})}" target="_blank" class="fs14 c-999" th:text="${shopVo['shopName']}"></a>
                                </section>
                            </div>
                        </div>
                        <div th:if="${shopVo['shopType']} !='COURSE' and ${shopVo['shopType']} !='BOOK'" class="media">
                            <div class="media-body">
                                <section class="cm-desc-txt__twoLine">
                                    <a href="javascript:void(0);" class="fs14 c-999" th:text="${shopVo['shopName']}"></a>
                                </section>
                            </div>
                        </div>
                    </div>
                </article>
                <aside class="col-sm-3">
                    <div class="text-center">
                        <span class="fs12 c-999"><i class="fa fa-rmb"></i></span>
                        <span class="fs16 c-999" th:if="(${shopVo['shopType']}=='COURSE' or ${shopVo['shopType']}=='BOOK' or ${shopVo['shopType']}=='EXAM') and (${selaSwitch}==3 and ${memberUser}==true)" th:text="${#numbers.formatDecimal(shopVo['memberPrice'],1,2,'POINT')}"></span>
                        <span class="fs16 c-999" th:if="(${shopVo['shopType']}=='COURSE' or ${shopVo['shopType']}=='BOOK' or ${shopVo['shopType']}=='EXAM') and (${selaSwitch}!=3 or ${memberUser}==false)" th:text="${#numbers.formatDecimal(shopVo['oldPrice'],1,2,'POINT')}"></span>
                        <span class="fs16 c-999" th:if="${shopVo['shopType']}!='COURSE' and ${shopVo['shopType']}!='BOOK' and ${shopVo['shopType']}!='EXAM'" th:text="${#numbers.formatDecimal(shopVo['oldPrice'],1,2,'POINT')}"></span>
                        <br th:if="${shopVo['shopType']}=='BOOK'"/>
                        <span th:if="${shopVo['shopType']}=='BOOK'" class="dd">
                            <small class="btn-group btn-group-sm form-inline">
                                <button class="btn btn-white minus-btn" type="button"><i class="fa fa-minus"></i></button>
                                <input class="form-control text-center pull-left book-num-inp buy-num-in" th:value="${shopVo['buyNum']}" name="buyNum" type="text" style="width: 50px;height: 30px"/>
                                <button class="btn btn-white add-btn" type="button"><i class="fa fa-plus"></i></button>
                            </small>
                        </span>
                    </div>
                </aside>
                <aside class="col-sm-2">
                    <div class="text-center">
                        <span class="fs14 c-333" th:if="${shopVo['shopType']} !='ACCOUNT'" th:utext="'<i class=\'fa fa-rmb\'></i>'+${#numbers.formatDecimal(shopVo['memberSubPrice']*shopVo['buyNum']+shopVo['discountPrice']*shopVo['buyNum']+shopVo['activityPrice']*shopVo['buyNum'],1,2,'POINT')}" th:attrappend="id='shop-yh-price-'+${shopVo['shopType']}+'-'+${shopVo['shopId']}">0.0</span>
                        <span class="fs14 c-333" th:if="${shopVo['shopType']} =='ACCOUNT'" th:attrappend="id='shop-yh-price-'+${shopVo['shopType']}+'-'+${shopVo['shopId']}">~</span>
                    </div>
                </aside>
                <aside class="col-sm-2">
                    <div class="text-center">
                        <span class="fs12 c-danger"><i class="fa fa-rmb"></i></span>
                        <span class="fs16 c-danger" th:if="(${shopVo['shopType']}=='COURSE' or ${shopVo['shopType']}=='BOOK' or ${shopVo['shopType']}=='EXAM') and (${selaSwitch}==3 and ${memberUser}==true)" th:text="${#numbers.formatDecimal(shopVo['memberPrice']*shopVo['buyNum'],1,2,'POINT')}" th:attrappend="id='shop-prcie-rela-'+${shopVo['shopType']}+'-'+${shopVo['shopId']}"></span>
                        <span class="fs16 c-danger" th:if="(${shopVo['shopType']}=='COURSE' or ${shopVo['shopType']}=='BOOK' or ${shopVo['shopType']}=='EXAM') and (${selaSwitch}!=3 or ${memberUser}==false)" th:text="${#numbers.formatDecimal(shopVo['realPrice']*shopVo['buyNum'],1,2,'POINT')}" th:attrappend="id='shop-prcie-rela-'+${shopVo['shopType']}+'-'+${shopVo['shopId']}"></span>
                        <span class="fs16 c-danger" th:if="${shopVo['shopType']}!='COURSE' and ${shopVo['shopType']}!='BOOK' and ${shopVo['shopType']}!='EXAM'" th:text="${#numbers.formatDecimal(shopVo['realPrice']*shopVo['buyNum'],1,2,'POINT')}" th:attrappend="id='shop-prcie-rela-'+${shopVo['shopType']}+'-'+${shopVo['shopId']}"></span>
                    </div>
                </aside>
                <aside th:if="${#strings.isEmpty(shopData)}" class="col-sm-1">
                    <div class="text-center">
                        <a title="删除" th:attrappend="data-shop-type=${shopVo['shopType']},data-shop-id=${shopVo['shopId']}" class="c-666 delete-shop-box" href="javascript:void(0);">
                            <i class="fa fa-trash-o"></i>
                        </a>
                    </div>
                </aside>
            </section>
        </div>
    </div>
    <hr/>
    <script th:inline="javascript" type="text/javascript">
        var shopNum = [[${resultMap['buyNum']}]];
        var sumDiscountPrice = [[${resultMap['sumDiscountPrice']}]];
        var sumOldPrice = [[${resultMap['sumOldPrice']}]];
        var sumActivityPrice = [[${resultMap['sumActivityPrice']}]];
        var freightPrice = [[${resultMap['freightPrice']}]];
        var sumRealPrice = [[${resultMap['sumRealPrice']}]];
        var sumMemberSubPrice = [[${resultMap['sumMemberSubPrice']}]];
        var haveBook = [[${haveBook}]];
        var haveCourse = [[${haveCourse}]];
        //查询活动和优惠券的条件
        var paramsList = [[${paramsList}]];
        var activityCodeMessage = [[${resultMap['activityCodeMessage']}]];
    </script>
</html>